<template>
  <div class="left-box">
    <div class="top_img">
      <div class="bg_img">
        <img :src="getAdmin.photo" alt />
      </div>
      <div class="mask"></div>
      <div class="imgbox">
        <div class="userphoto">
          <img :src="getAdmin.photo" alt />
        </div>
        <div class="title">
          <div class="s-name">{{ getAdmin.userName }}</div>
          <div class="s-qm">{{ getAdmin.signature }}</div>
        </div>
      </div>
      <div class="outerlink">
        <!-- <a href="https://me.csdn.net/qq_37970097">
          <img src="https://i.loli.net/2020/09/19/NEIDlrPOpKvV4bg.png" alt />
        </a>-->
        <!-- <a href="javascript:void(0);" class="weixin">
          <img src="https://i.loli.net/2020/08/18/LQXEphHivGBwm1u.png" alt />
        </a>-->
        <a href="javascript:void(0);">
          <el-tooltip class="item" effect="light" content="18824454802@163.com" placement="bottom">
            <img src="https://i.loli.net/2020/09/19/lmgyQjv83Yth1ON.png" alt />
          </el-tooltip>
        </a>
        <!-- <a href="https://gitee.com/ymshen">
          <img src="https://i.loli.net/2020/03/23/Y2rPBUkgLxiDIV4.png" alt />
        </a>-->
        <!-- <a href="https://github.com/lijinshen-ym?tab=repositories">
          <img src="https://i.loli.net/2020/03/23/iAzKYEQrO8H73bp.png" alt />
        </a>-->
        <a href="javascript:void(0);">
          <el-tooltip class="item" effect="light" content="2896583081" placement="bottom">
            <img src="https://i.loli.net/2020/04/15/qZv8CKNW1Jx5w2L.png" alt />
          </el-tooltip>
        </a>
      </div>
    </div>

    <div class="tag_list">
      <ul>
        <li>
          <router-link to="/main" tag="span">
            <span class="iconfont icon-zhuye"></span>
            <span>主页</span>
          </router-link>
        </li>
        <li>
          <router-link to="/module/message" tag="span">
            <span class="iconfont icon-liuyan"></span>
            <span>留言</span>
          </router-link>
        </li>
        <li>
          <router-link to="/module/archive" tag="span">
            <span class="iconfont icon-guidang"></span>
            <span>归档</span>
          </router-link>
        </li>
        <li class="tongji">
          <router-link to="/statistical" tag="span">
            <span class="iconfont icon-tj"></span>
            <span>统计</span>
          </router-link>
        </li>
        <li class="tongji">
          <span @click="goChat">
            <span class="iconfont icon-liaotian"></span>
            <span>chat</span>
          </span>
        </li>
      </ul>
    </div>

    <div class="beian">
      <div>
        <a href="http://beian.miit.gov.cn/">粤ICP备19141395号</a>
      </div>
      <div>
        <img src="https://pic.rmb.bdstatic.com/bjh/d0289dc0a46fc5b15b3363ffa78cf6c7.png" alt />
        <a
          href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44162402000025"
        >粤公网安备44162402000025号</a>
      </div>
    </div>
  </div>
</template>
<script>
import { mapGetters } from 'vuex'
import request from '../../api/request'
export default {
  name: 'Left',
  data() {
    return {}
  },
  computed: {
    ...mapGetters(['getAdmin', 'getToken'])
  },
  methods: {
    // 首页
    goHome() {
      this.$router.push({
        path: '/home',
        query: { distance: 0, page: 1 }
      })
    },
    // 打开公告，并向父组件传递数据
    openAnount() {
      this.$emit('changeDrawer', { type: 'annount' })
    },
    goChat() {
      if (this.getToken) {
        this.$router.push('/chatroom')
      } else {
        this.$router.push('/chat_login')
      }
    }
  }
}
</script>
<style lang="scss" scoped>
@import '../../scss/common.scss';
.left-box {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.left-box > div {
  width: 100%;
}
.top_img {
  height: 35%;
  width: 100%;
  position: relative;
  .bg_img {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    z-index: 1;
    img {
      height: 100%;
      width: 100%;
      object-fit: cover;
    }
  }
  .mask {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    z-index: 2;
    background: rgba(0, 0, 0, 0.1);
  }
  .imgbox {
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: 0;
    width: 100%;
    transform: translateY(50%);
    box-sizing: border-box;
    padding: 0px 20px;
    z-index: 3;
  }
  .userphoto {
    height: 100px;
    width: 100px;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 0px;
    // box-shadow: 0px 0px 30px 2px rgba(255, 255, 255, 1);
    img {
      display: inline-block;
      height: 100%;
      width: 100%;
      object-fit: cover;
    }
  }
}

.title {
  width: calc(100% - 100px);
  padding: 0px 10px;
  box-sizing: border-box;
  height: 100px;
  .s-name {
    height: 50px;
    line-height: 50px;
    font-size: 28px;
    font-weight: bold;
    color: rgb(255, 255, 255) !important;
  }
  .s-qm {
    height: 50px;
    display: flex;
    align-items: center;
    color: rgb(146, 146, 146) !important;
    font-weight: normal;
    font-weight: bold;
    font-size: 13px !important;
    line-height: 20px;
  }
}
.tag_list {
  margin-top: 70px;
  display: flex;
  justify-content: center;
  ul li {
    list-style: none;
    margin: 18px 0px;
    color: rgb(143, 143, 143);
    transition: 0.5s;
    font-weight: bold;
    span {
      font-size: 15px;
    }
  }
  li:hover {
    cursor: pointer;
    color: $ar_color;
  }
}
.outerlink {
  // margin: 20px 0;
  position: absolute;
  bottom: 5px;
  right: 20px;
  z-index: 3;
  text-align: center;
  a {
    text-decoration: none;
    display: inline-block;
    vertical-align: middle;
    img {
      width: 22px;
      vertical-align: middle;
    }
  }
  a:not(:last-child) {
    margin: 0px 10px;
  }
}

.beian {
  margin-top: 30px;
  // position: absolute;
  // bottom: 10px;
  // left: 50%;
  // transform: translateX(-50%);
  div {
    height: 28px;
    line-height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    img {
      margin-right: 4px;
    }
  }
  a {
    font-size: 15px;
    color: rgb(143, 143, 143);
    text-decoration: none;
  }
}
.weixin {
  img {
    height: auto;
    width: 25px !important;
  }
}
.iconfont {
  margin-right: 10px;
}
</style>
